#include "pythonLang.h"

PyLanguage::PyLanguage( const std::string& name, 
                        const std::string& compiler,
                        const std::string& compile_option) : Language(name) {
    this->compiler = compiler;
    this->compile_option = compile_option;
    suffix = "py";
    lang_type = INTERPRETER_LANGUAGE;
    extra_memory = 64 * 1024 * 1024;
    extra_time = 2000;
    suffixMap.emplace("py", "python3");
}
std::string PyLanguage::compileFileStr(std::string filename, std::string target) const {
    string command = "python3 -m py_compile " + filename;
    return command;
}
std::string PyLanguage::getBinaryFilename(std::string src) const {
    return src;
}
std::string PyLanguage::runFileStr(std::string filename) const {
    return "python3 " + filename;
}

const Language* PYTHON3_LANG = new PyLanguage{ "python3", "python3" };
const Language* PYTHON2_LANG = new PyLanguage{ "python2", "python2" };

